package com.mini.cn.goods.servlet.ws.common;

/**
 * Created with IntelliJ IDEA.
 * <p>
 * User: fly
 * Date: 2020-02-11
 * Time: 11:15 上午
 */
public class LCServiceConfig {
    public static final String PUSH_FROM = "MiniGoods";
    public static int PUSH_VERSION = 1;
    public final static String WRITEERRORCODE = "1008";
    public final static String SESSIONUNACTIVECODE = "1009";
    public final static String SESSIONUSERISNULL = "1010";
    public final static String LCDATAISNULL = "1011";

    public static class MsgSceneId {
        public static final String VERIFYHANDSHAKE = "MINIGOODS_%s_VERIFY";
        public static final String UNREGISTER = "MINIGOODS_%s_UNREGISTER";
        public static final String AUTOTEST = "MINIGOODS_%s_AUTOTEST";
        public static final String REGISTER = "MINIGOODS_%s_REGISTER";

        //接龙成功
        public static final String PAYSUCCESS = "MINIGOODS_%S_PAYSUCCESS";
    }

    public static class LCServiceCmd {
        //校验消息类型 0push 1.register单个消息 2unregister单个消息 3.ACK 4.校验消息
        public static final byte PUSH_TYPE = 0;//服务器端普通推送
        public static final byte REGISTER_TYPE = 1;
        public static final byte UNREGISTER_TYPE = 2;
        public static final byte ACK_TYPE = 3;
        public static final byte VERIFYHANDSHAKE_TYPE = 4;
        public static final byte AUTOTEST_TYPE = 5;
        public static final byte FASTPUSH_TYPE = 6;//服务器端快速推送消息
        public static final byte SENDMSG_TYPE = 7;//客户端的发送消息
        public static final byte LOGCONTROLL_TYPE = 8;//日志控制消息
    }

    //长连服务器错误集合
    public static class LCErrorMsg {

        public final static String RECODEKEY = "code";
        public final static String RETMSG = "msg";
        public final static String TIMESRAMP = "timestamp";
        public final static String DATA = "data";

        public final static int STATUS_OK = 0;
        public final static String MSG_STATUS_OK = "SUCCESS";

        public final static int STATUS_VERIFYHANDSHAKE_ERROR = 1001;
        public final static String MSG_VERIFYHANDSHAKE_ERROR = "用户不合法";

        public final static int STATUS_PARAMLOST_ERROR = 1002;
        public final static String MSG_PARAMLOST_ERROR = "缺少参数";

        public final static int STATUS_PUSHMSG_ERROR = 1003;
        public final static String MSG_PUSHMSG_ERROR = "推送消息错误";

        public final static int STATUS_NOOFFLINEMSG_ERROR = 1004;
        public final static String MSG_NOOFFLINEMSG_ERROR = "没有离线消息";

        public final static int STATUS_NOTMODIFY_ERROR = 1005;
        public final static String MSG_NOTMODIFY_ERROR = "没有最新消息";

        public final static int STATUS_AUTOTEST_ERROR = 1006;
        public final static String MSG_AUTOTEST_ERROR = "自动接入失败";

        public final static int STATUS_PARAMERROR_ERROR = 1007;
        public final static String MSG_PARAMERROR_ERROR = "参数错误";
    }
}
